/*
  ==============================================================================

  This is an automatically generated file created by the Jucer!

  Creation date:  30 May 2008 2:47:50 pm

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Jucer version: 1.11

  ------------------------------------------------------------------------------

  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-6 by Raw Material Software ltd.

  ==============================================================================
*/

#ifndef __JUCER_HEADER_KETONALCONFIGCOMPONENT_KETONALCONFIGCOMPONENT_7394A421__
#define __JUCER_HEADER_KETONALCONFIGCOMPONENT_KETONALCONFIGCOMPONENT_7394A421__

//[Headers]     -- You can add your own extra header files here --
#include "juce.h"
#include "XmlDataElement.h"
#include "KetonalConfig.h"
#include "KetonalFormEditorWindow.h"
//[/Headers]



//==============================================================================
/**
                                                                    //[Comments]
    An auto-generated component, created by the Jucer.

    Describe your class and how it works here!
                                                                    //[/Comments]
*/
class KetonalConfigComponent  : public Component,
                                public TextEditorListener,
                                public ButtonListener,
                                public ComboBoxListener
{
public:
    //==============================================================================
    KetonalConfigComponent (File _f);
    ~KetonalConfigComponent();

    //==============================================================================
    //[UserMethods]     -- You can add your own custom methods in this section.
	void textEditorTextChanged (TextEditor &editor);
	void textEditorReturnKeyPressed (TextEditor &editor);
	void textEditorEscapeKeyPressed (TextEditor &editor);
	void textEditorFocusLost (TextEditor &editor);
    //[/UserMethods]

    void paint (Graphics& g);
    void resized();
    void buttonClicked (Button* buttonThatWasClicked);
    void comboBoxChanged (ComboBox* comboBoxThatHasChanged);
	void closeFormEditor();

    // Binary resources:
    static const char* folder_png;
    static const int folder_pngSize;
    static const char* save_png;
    static const int save_pngSize;
    static const char* image_png;
    static const int image_pngSize;
    static const char* html_png;
    static const int html_pngSize;

    //==============================================================================
    juce_UseDebuggingNewOperator

private:
    //[UserVariables]   -- You can add your own custom variables in this section.
	XmlElement *xmlImgElm;
	XmlElement *xmlRoot;
	XmlDocument *xmlDoc;
	XmlElement *xmlUrl;
	XmlElement *xmlProxy;
	XmlElement *xmlFormData;
	File configFile;
	MemoryBlock *imgMemoryBlock;
	KetonalConfig *config;
	KetonalFormEditorWindow *formEditor;
    //[/UserVariables]

    //==============================================================================
    TextEditor* url;
    ToggleButton* proxyEnable;
    TextEditor* proxyUrl;
    ComboBox* proxyType;
    ImageButton* browseImage;
    Label* label2;
    ImageButton* saveConfig;
    Label* label;
    Label* label3;
    ImageButton* formEditorButton;
    Image* internalCachedImage2;

    //==============================================================================
    // (prevent copy constructor and operator= being generated..)
    KetonalConfigComponent (const KetonalConfigComponent&);
    const KetonalConfigComponent& operator= (const KetonalConfigComponent&);
};


#endif   // __JUCER_HEADER_KETONALCONFIGCOMPONENT_KETONALCONFIGCOMPONENT_7394A421__
